<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="yes" name="apple-touch-fullscreen"/>
    <meta content="telephone=no,email=no" name="format-detection"/>
    <meta name="App-Config" content="fullscreen=yes,useHistoryState=yes,transition=yes"/>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
    <title>退款规则</title>
    <style>
        *{margin:0;padding:0;}
        ul,li{
            list-style:none;
        }
        .m-ul{
            padding:15px 18px;
            font-size:14px;
            color:#333;
        }
        .m-li{
            position:relative;
            margin-bottom:10px;
            padding-left:14px;
            line-height:20px;
        }
        .m-icon{
            position:absolute;
            left:0;
            top:7px;
            width:6px;
            height:6px;
            border-radius:3px;
            background-color:#333;
        }
        .m-label{
            display:inline-block;
            margin:0 3px;
            height:20px;
            min-width:39px;
            line-height:20px;
            padding:0 7px;
            border-radius:10px;
            background-color:#eee;
            font-size:12px;
            vertical-align:baseline;
            white-space:nowrap;
        }
        .m-text{
            line-height:24px;
            word-wrap:break-word;
            word-break:break-all;
            overflow:hidden;
        }
    </style>
</head>
<body>
    <div id="root"></div>
    <script type="text/javascript">
        var data = [
            {
                time: '30分钟',
                ratio: '20%'
            },
        ];
        function moneyBack (data){
            var html = "<ul class='m-ul'>";
            var data = data ? data : [];
            data.push('如果使用了优惠券，退款时，退所有场次，并按最近场次的时间退款；如果有场次超过退款时间，则所有场次不可退款。');
            for(var i = 0, len = data.length; i < len; i++) {
                var item = data[i];
                html += "<li class='m-li'>";
                if (typeof item !== 'string') {
                    html += "<div class='m-icon'></div>提前<span class='m-label'>"+ item.time +"</span>，可退款<span class='m-label' style='min-width:31px;'>"+ item.ratio +"</span>";
                } else {
                    html += "<div class='m-icon' style='top:9px;'></div><div class='m-text'>"+ item +"</div>";
                }
                html += "</li>";
            }
            html += "</ul>";
            document.getElementById('root').innerHTML = html;
        }
    </script>
</body>
</html>